#ifndef QQ_NAVIGATION_MODEL
#define QQ_NAVIGATION_MODEL

#include <qstandarditemmodel.h>

#include "QQNavigationNode.h"

class QQNavigationModel : public QAbstractListModel
{
	Q_OBJECT
public:
	explicit QQNavigationModel(QObject* parent = nullptr);
	~QQNavigationModel();

	void setSelectedNode(QQNavigationNode* node);
	QQNavigationNode* getSelectedNode() const;

	QString addPageNode(QIcon icon);
	QString addPageNode(int keyPoints, QIcon icon);

	QQNavigationNode* getNavigationNode(QString nodeKey) const;

protected:
	int rowCount(const QModelIndex& parent = QModelIndex()) const override;
	QVariant data(const QModelIndex& index, int role) const override;

private:
	QList<QQNavigationNode*> mNodeList;
	QQNavigationNode* mSelectedNode;
};

#endif // QQ_NAVIGATION_MODEL
